self.queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
self.source = dispatch_source_create(DISPATCH_SOURCE_TYPE_VNODE, descriptor, DISPATCH_VNODE_WRITE, self.queue);
__weak typeof(self) weakSelf = self;
dispatch_source_set_event_handler(self.source, ^{
[weakSelf directoryDidChange];
});
dispatch_source_set_cancel_handler(self.source, ^{
close(descriptor);
});
dispatch_resume(self.source);